#ifndef PROJECT_H
#define PROJECT_H

#include "data_set.h"
#include "results_document.h"
#include "data_import_dialog.h"

#include <QIcon>
#include <QtDebug>
#include <QFileInfo>
#include <QTreeWidget>
#include <QApplication>
#include <QTreeWidgetItem>

typedef enum {
    DISPLAY_TYPE_PROJECT=1,
    DISPLAY_TYPE_GENOTYPES,
    DISPLAY_TYPE_GRAPH,
    DISPLAY_TYPE_MAP,
    DISPLAY_TYPE_RESULTS,
} DISPLAY_TYPES;

class Project : public QObject {
    Q_OBJECT


public:
    Project(QObject *parent=0);



    inline DataSet *getData() { return _theData; }
    void setData( DataSet *theData );

    // results related materials
    int numResults() { return _results.count(); }
    ResultsDocument* getResults( int idx );

    // UI stuff
    void setTreeWidget( QTreeWidget *theList );

public slots:
    void slotImportGenotypes();
    void slotRunFrequencies();
    void slotRunGst();
    void slotRunAMOVA();

private:
    QString _projectPath;

    QTreeWidget *_theTree;
    DataSet *_theData;

    QTreeWidgetItem *_topItem;
    QTreeWidgetItem *_geneticDataItem;
    QTreeWidgetItem *_resultsItem;

    QList<ResultsDocument*> _results;

};

#endif // PROJECT_H
